package com.WJY.service.impl;

import com.WJY.dao.StudentDao;
import com.WJY.pojo.Student;
import com.WJY.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {

    @Autowired
    private StudentDao studentDao;

    @Override
    public List<Student> queryStudentList() {
        return studentDao.queryStudentList();
    }

    @Override
    public Student queryStudentById(int id) {
        return studentDao.queryStudentById(id);
    }

    @Override
    public List<Student> queryStudentByName(String name) {
        return studentDao.queryStudentByName(name);
    }

    @Override
    public int delStudentById(int id) {
        return studentDao.delStudentById(id);
    }

    @Override
    public int addStudent(Student student) {
        return studentDao.addStudent(student);
    }

    @Override
    public int updateStudent(Student student) {
        return studentDao.updateStudent(student);
    }
}
